<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生信息</title>
<link rel="stylesheet" href="resources/layui/css/layui.css">
</head>
<body>
<div class="demoTable">
  查询学生：
  <div class="layui-inline">
    <input class="layui-input" name="id" id="demoReload" autocomplete="off">
  </div>
  <button class="layui-btn" data-type="reload">搜索</button>
</div>
<table class="layui-table" lay-data="{height: 'full-200', cellMinWidth: 80, page: true, limit:10,url:'resources/json/student.json', id:'demo',toolbar: '#toolbarDemo',defaultToolbar: ['filter', 'exports', 'print']}" lay-filter="demo">
 <thead>
    <tr>
      <th lay-data="{type:'checkbox', fixed: 'left'}">学号</th>
      <th lay-data="{field:'sno', align:'center',sort:true}">学号</th>
      <th lay-data="{field:'sname',align:'center'}">姓名</th>
      <th lay-data="{field:'sSex',sort: true,align:'center',templet:function(d){
        return d.sex=='男'?'男性':'女性'; }">性别</th>
      <th lay-data="{field:'classId',align:'center'}">班级号</th>
      <th lay-data="{field:'majorId',align:'center',totalRow:true}">专业号</th>
      <th lay-data="{field:'idCard', sort: true,align:'center'}">身份证号</th>
      <th lay-data="{field:'address', sort: true,align:'center'}">家庭地址</th>
      <th lay-data="{field:'birthday', sort: true,align:'center'}">出生日期</th>
    </tr>
  </thead>
</table> 

 <script src="resources/layui/layui.js"></script>
<script>
layui.use('table', function(){
    var table = layui.table;
})


</script>
</body>
</html>
